export type CommonSettings = {
  port: number;
  https: boolean;
  certFile: string;
  keyFile: string;
};

export type LogSettings = {
  maxSize: number;
  maxBackups: number;
  maxAge: number;
  compress: boolean;
  operMaxSize: number;
};

export type GatewaySettings = {
  listen: number;
  tls: boolean;
  certFile: string;
  keyFile: string;
};
export type DBSettings = {
  host: string;
  port: number;
  username: string;
  password: string;
  database: string;
};

export type Settings = {
  autoUpdate: boolean;
  autoStart: boolean;
  app: CommonSettings;
  log: LogSettings;
  gateway: GatewaySettings;
  lab: GatewaySettings;
  db: DBSettings;
};

export type SettingKey = keyof Settings;
export type SettingValue = Settings[keyof Settings];
